﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
//引入命名空间
using stwh_Web.EbgOnlineService;
using stwh_Web.Handler.stwh_admin;

namespace stwh_Web.Handler.stwh_web
{
    /// <summary>
    /// ebgonline 的摘要说明shetbwg
    /// </summary>
    public class ebgonline : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "application/json";
            try
            {
                string online = new onlineSoapClient().GetOnline("4BA41A2B82877588600C949E866AA574");
                context.Response.Write(online);
            }
            catch (Exception exception)
            {
                BaseHandler.AddLog("获取实时人数异常，信息为：" + exception.Message);
                context.Response.Write("{\"sumcount\":0,\"msg\":\"服务器错误！\",\"msgcode\":\"-3\"}");
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}